
package com.kugou.game.sdk.entity;

/**
 * 描述:充值常量
 *
 * @author wcj
 * @since 2015年12月3日 下午2:05:13
 */
public class PayConstant {

    public class ChargeType {
        /**
         * 电话卡支付
         */
        public static final int TYPE_PHONE = 28;

        /**
         * 支付宝支付
         */
        public static final int TYPE_ALIPAY = 29;

        /**
         * 银联支付
         */
        public static final int TYPE_UNIONPAY = 34;

        /**
         * 游币支付
         */
        public static final int TYPE_KUBI = 0;

        /** 点卡支付 */
        public static final int TYPE_GAME_CARD = 43;

        /** 短信支付 */
        public static final int TYPE_SMS = 44;

        /** 易联支付 */
        public static final int TYPE_YIPAY = 48;

        /** 微信支付 */
        public static final int TYPE_WEIXIN = 50;
    }

    /**
     * 描述:充值方式index
     *
     * @author wcj
     * @since 2015年11月17日 下午6:01:17
     */
    public class ChargeIndexMode {
        public static final int MODE_ALIPAY = 0;

        public static final int MODE_UNION = 1;

        public static final int MODE_WEIXIN = 2;

        public static final int MODE_MOBILE_CARD = 3;

        public static final int MODE_YOUBI = 4;

        public static final int MODE_GAME_CARD = 5;

        public static final int MODE_SMS = 6;

    }

    /**
     * index 转为 type
     * 
     * @param mode
     * @return
     */
    public static int swapRechargeMode(int mode) {
        if (mode == ChargeIndexMode.MODE_ALIPAY) {
            return ChargeType.TYPE_ALIPAY;
        } else if (mode == ChargeIndexMode.MODE_UNION) {
            return ChargeType.TYPE_YIPAY;
        } else if (mode == ChargeIndexMode.MODE_MOBILE_CARD) {
            return ChargeType.TYPE_PHONE;
        } else if (mode == ChargeIndexMode.MODE_YOUBI) {
            return ChargeType.TYPE_KUBI;
        } else if (mode == ChargeIndexMode.MODE_GAME_CARD) {
            return ChargeType.TYPE_GAME_CARD;
        } else if (mode == ChargeIndexMode.MODE_SMS) {
            return ChargeType.TYPE_SMS;
        } else if (mode == ChargeIndexMode.MODE_WEIXIN) {
            return ChargeType.TYPE_WEIXIN;
        } else {
            return mode;
        }
    }
}
